<template>
	<view class="content">
		<view class="header">
			<view class="name-tit">张三 您好：</view>
			<textarea class="head-cont" v-model="form.invite_content"></textarea >
		</view>
		<view class="mid-line"></view>
		<view style="height: 40upx; background: #FFFFFF;"></view>
		<view class="mid-cont">
			<view class="cont-box">
				<view class="foot-tit">面试时间</view>
				<view class="foot-cont" @click="show=true">
					<input class="cont-cont-tit" v-model="form.interview_date" placeholder="请选择面试时间">
					
					<u-calendar v-model="show" :mode="mode" @change="change"></u-calendar>
					<image src="../../static/right.png" mode=""></image>
				</view>
			</view>
			<view class="down-line"></view>
			<view class="cont-box">
				<view class="foot-tit">面试地点</view>
				<view class="foot-cont">
					<!-- <view class="cont-cont-tit">请输入面试地点</view> -->
					<input class="cont-cont-tit" v-model="form.interview_area" placeholder="请输入面试地点" style="width: 200upx;"></input>
					<image src="../../static/right.png" mode=""></image>
				</view>
			</view>
			<view class="down-line"></view>
			<view class="cont-box">
				<view class="foot-tit">联系人</view>
				<view class="foot-cont">
					<!-- <view class="cont-cont-tit">请输入联系人姓名</view> -->
					<input class="cont-cont-tit" v-model="form.link_name" placeholder="请输入联系人姓名" style="width: 230upx;"></input>
					<image src="../../static/right.png" mode=""></image>
				</view>
			</view>
			<view class="down-line"></view>
			<view class="cont-box">
				<view class="foot-tit">手机</view>
				<view class="foot-cont">
					<!-- <view class="cont-cont-tit">请输入手机号</view> -->
					<input class="cont-cont-tit" v-model="form.link_mobile" placeholder="请输入手机号" style="width: 170upx;"></input>
					<image src="../../static/right.png" mode=""></image>
				</view>
			</view>
			<view class="down-line"></view>
			<view class="cont-box">
				<view class="foot-tit">备注</view>
				<view class="foot-cont">
					<input class="cont-cont-tit" style="width: 170upx;"></input>
					<image src="../../static/right.png" mode=""></image>
				</view>
			</view>
			<view class="down-line"></view>
		</view>
		<view class="yaoqing-btn">
			<view class="down-line martop"></view>
			<button type="default" @click="sendInvite()">发送邀请</button>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				show:false,
				mode:"date",
				id: "",
				form:{}
			}
		},
		onLoad(e) {
			this.id = e.id
			console.log(e);
			this.form.invite_content="经过我司HR的初步筛选，认为你与我们的职位要求匹配，现诚挚邀请你来我司面谈。"
		},
		methods: {
			async sendInvite() {
				this.form.user_job_send_id=this.id;
				console.log(this.form)
				const res = await this.get('/Index/UserCompany/send_invite_interview', this.form);
				console.log(res)
				if(res.code == 200){
					var that=this
					uni.showToast({
						title:'邀请成功',
						duration:1000,
						icon:'none',
						success() {
							uni.navigateTo({
								url:'./company_check_user_resume?id='+that.id
							})
						}
					})
				}
			},
			change(e) {
				this.form.interview_date = e.result;
			},
		}
	}
</script>

<style lang="scss" scoped>
	.content{
		.header{
			height: 256upx;
			.name-tit{
				color: #101010;
				font-size: 28upx;
				margin: 28upx 0 20upx 24upx;
			}
			.head-cont{
				color: #C2C7CC;
				width: 702upx;
				font-size: 28upx;
				margin-left: 24upx;
			}
		}
		.mid-line{
			background: #F6F6F6;
			height: 20upx;
		}
		.mid-cont{
			.cont-box{
				display: flex;
				justify-content: space-between;
				font-size: 28upx;
				.foot-tit{
					margin: 20upx 0 18upx 24upx;
				}
				.foot-cont{
					display: flex;
					.cont-cont-tit{
						color: #999898;
						margin-top: 4upx;
						font-size: 28upx;
						text-align: right;
					}
					image{
						height: 48upx;
						width: 48upx;
						margin-right: 10upx;
					}
					margin: 20upx 0 20upx 0;
				}
			}
		}
		.down-line{
			border: 2upx solid #F0F0F0;
		}
		.yaoqing-btn{
			.martop{
				margin: 300upx 0 34upx 0;
			}
			button{
				width: 688upx;
				height: 74upx;
				color: #FFFFFF;
				font-size: 28upx;
				background: #3291F8;
			}
		}
	}
</style>
